package cn.scw.project.goods.domain;

import cn.scw.framework.aspectj.lang.annotation.Excel;
import cn.scw.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
/**
 * 商品对象 g_commodity
 *
 * @author api
 * @date 2020-05-20
 */
public class GCommodity extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 商品id */
    private Long id;

    /** 轮播图片 */
    @Excel(name = "轮播图片")
    private String carouselUrl;

    /** 缩略图 */
    @Excel(name = "缩略图")
    private String litimgUrl;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String name;

    /** 商品简介 */
    @Excel(name = "商品简介")
    private String intro;

    /** 商品押金 */
    @Excel(name = "商品押金")
    private Double cashPledge=0.0;

    /** 商品类型（0设备采购，1设备租赁-包月，2设备租赁-两年赠机）——字典表维护 */
    @Excel(name = "商品类型", readConverterExp = "设备采购，设备租赁-包月，设备租赁-两年赠机")
    private String purchasingTypes;

    /** 商品价格 */
    @Excel(name = "商品价格")
    private Double price;

    /** 商品数量 */
    @Excel(name = "商品数量")
    private int count;

    /** 商品详情 */
    @Excel(name = "商品详情")
    private String details;

    /** 商品分类（0：设备；1：办公耗材） */
    @Excel(name = "商品分类", readConverterExp = "0=：设备；1：办公耗材")
    private String facilityType;

    /** 商品详细分类——字典表维护 */
    @Excel(name = "商品详细分类——字典表维护")
    private Long facilityDetailsType;

    /** 是否上架 */
    @Excel(name = "是否上架")
    private boolean isPutaway=true;

    /** 添加日期 */
    @Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date putawayDate;

    /** 是否多规格 */
    @Excel(name = "是否多规格")
    private boolean isModel=false;

    public GCommodity() {
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setCarouselUrl(String carouselUrl)
    {
        this.carouselUrl = carouselUrl;
    }

    public String getCarouselUrl()
    {
        return carouselUrl;
    }
    public void setLitimgUrl(String litimgUrl)
    {
        this.litimgUrl = litimgUrl;
    }

    public String getLitimgUrl()
    {
        return litimgUrl;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setIntro(String intro)
    {
        this.intro = intro;
    }

    public String getIntro()
    {
        return intro;
    }
    public void setCashPledge(Double cashPledge)
    {
        this.cashPledge = cashPledge;
    }

    public Double getCashPledge()
    {
        return cashPledge;
    }
    public void setPurchasingTypes(String purchasingTypes)
    {
        this.purchasingTypes = purchasingTypes;
    }

    public String getPurchasingTypes()
    {
        return purchasingTypes;
    }
    public void setPrice(Double price)
    {
        this.price = price;
    }

    public Double getPrice()
    {
        return price;
    }
    public void setCount(int count)
    {
        this.count = count;
    }

    public int getCount()
    {
        return count;
    }
    public void setDetails(String details)
    {
        this.details = details;
    }

    public String getDetails()
    {
        return details;
    }
    public void setFacilityType(String facilityType)
    {
        this.facilityType = facilityType;
    }

    public String getFacilityType()
    {
        return facilityType;
    }
    public void setFacilityDetailsType(Long facilityDetailsType)
    {
        this.facilityDetailsType = facilityDetailsType;
    }

    public Long getFacilityDetailsType()
    {
        return facilityDetailsType;
    }
    public void setIsPutaway(boolean isPutaway)
    {
        this.isPutaway = isPutaway;
    }

    public boolean getIsPutaway()
    {
        return isPutaway;
    }
    public void setPutawayDate(Date putawayDate)
    {
        this.putawayDate = putawayDate;
    }

    public Date getPutawayDate()
    {
        return putawayDate;
    }
    public void setIsModel(boolean isModel)
    {
        this.isModel = isModel;
    }

    public boolean getIsModel()
    {
        return isModel;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("carouselUrl", getCarouselUrl())
            .append("litimgUrl", getLitimgUrl())
            .append("name", getName())
            .append("intro", getIntro())
            .append("cashPledge", getCashPledge())
            .append("purchasingTypes", getPurchasingTypes())
            .append("price", getPrice())
            .append("count", getCount())
            .append("details", getDetails())
            .append("facilityType", getFacilityType())
            .append("facilityDetailsType", getFacilityDetailsType())
            .append("isPutaway", getIsPutaway())
            .append("putawayDate", getPutawayDate())
            .append("isModel", getIsModel())
            .toString();
    }
}
